import SvgIcon from '@/components/SvgIcon/index.vue'
import Pagination from '@/components/Pagination/index.vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import Category from './Category/category.vue'
const allGloablComponents: any = { SvgIcon, Pagination, Category }
// 对外暴露插件对象
export default {
  install(app: any) {
    // 注册项目全局组件
    Object.keys(allGloablComponents).forEach((key) => {
      // 注册组件
      app.component(key, allGloablComponents[key])
    })
    // 注册element-plus全局图标
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component(key, component)
    }
  },
}
